#include <iostream>
#include<cstring>

int add(int a, int b, int c = 0);


int add(int a, int b, int c)
{
    return a + b + c;

}

bool func(int a, char *errorMsg = NULL)
{
    if (errorMsg != NULL)
    {
        strcpy(errorMsg, "connect error\n");
    }
    return false;
}

/*占位参数*/
int add_1(int a, int b, int = 0)
{
    return a+ b;
}


int main()
{
    char msg[1024] = {0};
    if (func(1, msg) == false)
    {
        std::cout<<msg<<std::endl;

    }
    std::cout<<add(10, 20)<<std::endl;
    return 0;
}